package com.bandroid.demo.view;

import android.os.Bundle;

import com.bandroid.demo.R;
import com.bandroid.demo.base.MyActivity;
import com.base.balibrary.ioc.BaseContentView;
import com.base.balibrary.ioc.BaseViewInject;
import com.base.balibrary.view.custom.CarouselRelativeLayout;

/**
 * BAndroid
 * Created by YichenZ on 2015/9/18 11:31.
 */
@BaseContentView(R.layout.activity_userguide)
public class UserGuideActivity extends MyActivity implements CarouselRelativeLayout.ViewOnClickLis {
    @BaseViewInject(R.id.carouselRl)
    CarouselRelativeLayout carouselRl;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        initData();
    }

    private void initData() {
        Object[] res = new Integer[]{R.drawable.ic_launcher, R.drawable.ic_launcher, R.drawable.ic_launcher, R.drawable.ic_launcher};
        carouselRl.setViewOnClickNum(0, this);
        carouselRl.setDefault(R.drawable.ic_launcher,0,0,3);
        carouselRl.show(true, res);
    }

    @Override
    public void setOnClickLis(int i) {
        if (i == 3) {
            strActivity(this, MainActivity.class, true, false);
        }
    }
}
